Home - Step by step tutorials - change_ovh_kernel
Added: 08/09/2012 by John
Change OVH/Kimsufi Centos kernel to stock Centos kernel
OVH / Kimsufi has some very good deals on dedicated servers, but they also come with there own custom kernel. They say this kernel is optimized for the servers it runs on, and that it enhances security.I found some problems with that kernel, the OVH kernel misses some fundamental modules, like NFS, and on some Kimsufi servers I had a lot segfaults (caused by missing drivers).
So I found that I needed to use the stock kernel on these servers in order to be able to use them as intended.
Be careful, double check everything before you restart, and don't try to do this on a production server, unless you know exactly what you are doing! If something goes wrong, start your server in recovery mode and fix it (great feature of OVH!).
All commands are executed as root.
Centos
Step 1
First, install the stock Centos kernel via yum. Write down the version it installs!
yum install kernel
Step 2
Check in /boot if the files are there:
ls -al /boot
You should see "vmlinuz-2.6.32-279.2.1.el6.x86_64" and "initramfs-2.6.32-279.2.1.el6.x86_64.img" (or whatever version yum just installed for you)
Step 3
Then, check your root partition, and write it down. Look for "/", and write down the filesystem (/dev/sda1 in this example)
df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 10403128 1268588 8610252 13% /
devtmpfs 1012168 164 1012004 1% /dev
tmpfs 1021600 0 1021600 0% /dev/shm
/dev/sda1 10403128 1268588 8610252 13% /
/dev/sda2 958137396 102154796 807695268 12% /home
Step 4
Then edit "/boot/grub/grub.conf". Comment out or remove everything you see, and replace it with this, or make a backup:
rm /etc/grub.conf
cp /boot/grub/grub.conf /boot/grub/grub.conf_bu
nano /boot/grub/grub.conf
cp /boot/grub/grub.conf /boot/grub/grub.conf_bu
nano /boot/grub/grub.conf
default 0 timeout 5 title Centos Install (PXE) root (hd0,0) kernel /boot/vmlinuz-2.6.32-279.2.1.el6.x86_64 root=/dev/sda1 initrd /boot/initramfs-2.6.32-279.2.1.el6.x86_64.img
Step 5.
Check check, double check! Open your /boot/grub/grub.conf again, and check the filenames. If you are sure they are all correct:Step 6.
Cross your fingers and type:
reboot
Step 7.
Your server should be up in a few minutes. Once you logged in, check your kernel:
uname -a
You should see your newly installed kernel:
Linux ks1234567.kimsufi.com 2.6.32-279.2.1.el6.x86_64 #1 SMP Fri Jul 20 01:55:29 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Congratulations, you just installed a stock kernel on your server!
If your server does not come up after a few minutes, go to your OVH manager, set your netboot to "rescue-pro" and reboot your server. Login and replace /boot/grub/grub.conf by your backup /boot/grub/grub.conf_bu
Comments